<?php

//login
$route->any('test', 'TestController@test');
$route->any('native/notify', 'PayController@wx_notify');
$route->any('notify', 'PayController@wx_notify');

$route->any('login', 'AuthController@login');
$route->any('pc/login/url', 'AuthController@pc_login_url');
$route->any('pc/login', 'AuthController@pc_login');


//banner
$route->get('banner/index', 'BannerController@index');

//cookbook
$route->get('service/index', 'ServiceController@index');
$route->get('service/info', 'ServiceController@info');

//用户列表
$route->get('user/list', 'UserController@list');

//work
$route->get('work/index', 'WorkController@index');
$route->get('work/info', 'WorkController@info');

//material
$route->get('material/index', 'MaterialController@index');
$route->get('material/info', 'MaterialController@info');

//safe
$route->any('safe/check', 'InitController@safe_check');

//拍片儿
$route->any('config/info', 'ConfigController@info');

//category
$route->get('category/index', 'CategoryController@index');

$route->any('comment/index', 'CommentController@index');

$route->any('order/comment/index', 'OrderCommentController@index');

$route->group(['middleware' => 'api.auth'], function ($route) {
    //支付查询
    $route->any('pay/query', 'PayController@wx_query');

    $route->get('init', 'InitController@init');

    //token
    $route->any('qiniu/token', 'QiNiuController@getToken');



    //cookbook

    $route->any('work/store', 'WorkController@store');
    $route->any('work/destroy', 'WorkController@destroy');

    //material

    $route->any('material/store', 'MaterialController@store');
    $route->any('material/destroy', 'MaterialController@destroy');

    //comment

    $route->any('comment/store', 'CommentController@store');
    $route->any('comment/destroy', 'CommentController@destroy');

    //notebook
    $route->get('notebook/index', 'NotebookController@index');
    $route->any('notebook/store', 'NotebookController@store');
    $route->any('notebook/destroy', 'NotebookController@destroy');

    //star
    $route->any('star/store', 'StarController@store');
    //focus
    $route->any('focus/store', 'FocusController@store');
    //notification
    $route->get('notification/index', 'NotificationController@index');
    $route->get('notification/info', 'NotificationController@info');

    //我的
    $route->get('user/index', 'UserController@index');
    //fans
    $route->get('user/fans', 'UserController@fans');
    //focus
    $route->get('user/focus', 'UserController@focus');
    $route->any('user/store', 'UserController@store');
    //认证
    $route->any('user/identify', 'UserController@identify');

    //appoint
    $route->get('appoint/index', 'AppointController@index');
    $route->get('appoint/info', 'AppointController@info');

    //order
    $route->get('order/index', 'OrderController@index');
    $route->get('order/material/info', 'OrderController@material_order_info');

    $route->get('package/setting/index', 'PackageSettingController@index');

    $route->any('create/pay', 'OrderController@createPay');


    //预约
    $route->any('appoint/store', 'AppointController@store');
    $route->any('appoint/cancel', 'AppointController@cancel');
    $route->any('appoint/destroy', 'AppointController@destroy');

    //comment
    $route->any('order/comment/store', 'OrderCommentController@store');


    //honey
    $route->any('honey/detail', 'HoneyController@detail');
    $route->any('honey/store', 'HoneyController@store');
    $route->any('honey/flow', 'HoneyController@flow');

    //balance
    $route->any('balance/detail', 'BalanceController@detail');
    $route->any('balance/flow', 'BalanceController@flow');

    //服务商
    $route->any('merchant/store', 'MerchantController@store');

    //提现
    $route->any('bank/index', 'BankController@index');
    $route->any('withdraw/apply', 'WithdrawController@apply');
    $route->any('withdraw/index', 'WithdrawController@index');

});
